<template>
	<div class="view-payment">
		
		<header-bar title="支付">
    		<a class="back" @click="onBackClick"></a>
    		<a class="tools"><i class="help"></i></a>
    	</header-bar>

    	<div class="body">
    		
    		<panel class="payment">
    			<panel-item>
    				<label>支付保险金额</label>
    				<p><strong>￥{{fmoney(amount)}}元</strong></p>
    			</panel-item>
    		</panel>

    		<h2 class="panel-title">请选择支付方式</h2>
    		<panel class="types">
    			<panel-item :bind="()=>{onChoose(1)}">
    				<i class="wc"></i>
    				<label>微信支付</label>
    			</panel-item>
    			<panel-item :bind="()=>{onChoose(2)}">
    				<i class="kq"></i>
    				<label>快钱信用卡支付</label>
    				<p>仅支持信用卡预授权</p>
    			</panel-item>
    		</panel>

    	</div>

    	<small class="tips">凹凸共享租车服务热线<a href="tel:4006680202">400-668-0202</a></small>

	</div>
</template>

<script>
import headerBar from '@/components/header'
import panel from '@/components/panel'
import panelItem from '@/components/panelItem'
import toast from '@/components/toast'
import alert from '@/components/alert'
import loading from '@/components/loading'
import fmoney from '@/assets/fmoney'
import {getMobile} from '@/assets/token'
import $http from '@/assets/http'

export default {
	data() {
		return {
			fmoney,
			amount: 0,
		}
	},
	async created() {
		this.amount = this.$route.params.amount
	},
	methods: {
		onBackClick() {
			this.$router.back()
		},
		onChoose(type) {
			const {id, amount} = this.$route.params
			if (type === 1) {

			} else if (type === 2) {
				this.$router.push(`/payment/list/${id}/${amount}`)
			}
		}
	},
	components: {
		headerBar,
		panel,
		panelItem,
	}
}
</script>

<style scoped lang="scss">
	@import './style'
</style>